package com.itdl.mq.base;

import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.connection.Message;

/**
 * 广播消息监听器
 */
@Slf4j
@SuppressWarnings("all")
public abstract class AbstractFanoutListener implements BaseFanoutMessageListener {

    public abstract void doHandle(Message message);

    @Override
    public void onMessage(Message message, byte[] pattern) {
        String key = message.toString();
        log.info("=====>>>订阅到key【{}】消息了", key);
        doHandle(message);
    }

}
